

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Open Legislation v2.0 API Docs &mdash; Open Legislation 2.0-alpha documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="Open Legislation 2.0-alpha documentation" href="#"/>
        <link rel="next" title="Bills and Resolutions API" href="bills.html"/>
        <link rel="prev" title="&lt;no title&gt;" href="reference.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="reference.html" class="icon icon-home"> Open Legislation
          

          
          </a>

          
            
            
              <div class="version">
                2.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#"><strong>Open Legislation v2.0 API Docs</strong></a><ul>
<li class="toctree-l2"><a class="reference internal" href="#what-is-this">What is this?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#api-usage">API Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="#legislative-content-types">Legislative Content Types</a></li>
<li class="toctree-l2"><a class="reference internal" href="#terminology">Terminology</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bills.html"><strong>Bills and Resolutions API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="calendars.html"><strong>Senate Calendar API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="agendas.html"><strong>Senate Agenda API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="committees.html"><strong>Senate Committee API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="laws.html"><strong>NYS Laws API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="transcripts_floor.html"><strong>Senate Floor Transcripts API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="transcripts_ph.html"><strong>Public Hearing Transcripts API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="members.html"><strong>Senate Members API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="agg_updates.html"><strong>Aggregate Updates API</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html"><strong>Search APIs</strong></a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="reference.html">Open Legislation</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="reference.html">Docs</a> &raquo;</li>
        
      <li><strong>Open Legislation v2.0 API Docs</strong></li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="open-legislation-v2-0-api-docs">
<h1><strong>Open Legislation v2.0 API Docs</strong><a class="headerlink" href="#open-legislation-v2-0-api-docs" title="Permalink to this headline">¶</a></h1>
<div class="section" id="what-is-this">
<h2>What is this?<a class="headerlink" href="#what-is-this" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="http://legislation.nysenate.gov">Open Legislation</a> is a web service that delivers legislative information from the New York State Senate and Assembly
to the public in near-real time. It is used to serve legislative data for <a class="reference external" href="http://www.nysenate.gov">nysenate.gov</a> and other various services.</p>
<p>Legislative data is sent via the Legislative Bill Drafting Commission (LBDC) in a raw file format. The data is
ingested and cleaned up internally by Open Leg and made available for consumption through a REST API.</p>
<p>This documentation explains how to utilize the REST API to retrieve bills, resolutions, laws, committee agendas, and more.
You will need to sign up for a free API key from the Open Legislation homepage in order to use this service.</p>
<p>The code is open source and available on <a class="reference external" href="http://github.com/nysenate/OpenLegislation">Github</a>.</p>
</div>
<div class="section" id="api-usage">
<h2>API Usage<a class="headerlink" href="#api-usage" title="Permalink to this headline">¶</a></h2>
<p><strong>Obtaining a key</strong></p>
<p>To register and obtain an API key, visit our main page <a class="reference external" href="http://legislation.nysenate.gov">here</a>.</p>
<p><strong>Making requests</strong></p>
<p>All URIs listed in these docs are relative to the Open Legislation subdomain:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">legislation</span><span class="o">.</span><span class="n">nysenate</span><span class="o">.</span><span class="n">gov</span>
</pre></div>
</div>
<p>To make an API request using your key, set the key string as the value of the &#8216;key&#8217; request parameter in the request URL.</p>
<p>For example, if you wanted to get data for bill S1 of the 2015 session, your request would look something like this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>legislation.nysenate.gov/api/3/bills/2015/S1?key=*your key goes here*
</pre></div>
</div>
</div>
<div class="section" id="legislative-content-types">
<h2>Legislative Content Types<a class="headerlink" href="#legislative-content-types" title="Permalink to this headline">¶</a></h2>
<p>We currently offer the following types of data:</p>
<blockquote>
<div><ul class="simple">
<li>Bills and Resolutions</li>
<li>Committee Agendas</li>
<li>Senate Calendars</li>
<li>NYS Laws</li>
<li>Senate Floor and Public Hearing Transcripts</li>
<li>Committees</li>
<li>Members</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="terminology">
<h2>Terminology<a class="headerlink" href="#terminology" title="Permalink to this headline">¶</a></h2>
<p>First let&#8217;s define some common legislative terminology</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Session Year:</th><td class="field-body">A legislative session year in New York State comprises of two years, with the first year being an odd numbered year.</td>
</tr>
<tr class="field-even field"><th class="field-name">Bill:</th><td class="field-body">A bill is passed with the intention of amending or creating a specific portion of NYS Law.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Resolution:</th><td class="field-body">A resolution does not necessarily impact law and are often introduced to provide honorable mentions.</td>
</tr>
<tr class="field-even field"><th class="field-name">Calendar:</th><td class="field-body">A legislative calendar is a snapshot of the status of bills that are under discussion at a particular time.
A calendar will typically contain a floor calendar and an active list, along with supplemental floor calendars and active lists.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Floor Calendar:</th><td class="field-body">The floor calendar is a listing of all bills that are under discussion (on the floor).  A bill must be read on the
senate floor a minimum of three times to be eligible for a vote, and the floor calendar will indicate the number of
readings for each bill at its time of publication.</td>
</tr>
<tr class="field-even field"><th class="field-name">Active List:</th><td class="field-body">An active list is a listing of bills that are scheduled for discussion during a single senate session.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Committee:</th><td class="field-body">Committees are groups of senators that are focused on particular areas of law.  Bills must be approved by a committee
in order to be reported to the senate floor.</td>
</tr>
<tr class="field-even field"><th class="field-name">Uni-Bill:</th><td class="field-body">A uni bill is a bill that is sent through both chambers concurrently</td>
</tr>
</tbody>
</table>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="bills.html" class="btn btn-neutral float-right" title="Bills and Resolutions API" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="reference.html" class="btn btn-neutral" title="&lt;no title&gt;" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2014, NY State Senate Technology Services.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'2.0-alpha',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>